<template>
  <div class="container">
    <div class="tab-bar">
      <!-- <div class="tab-bar-item">
        用户服务协议
      </div>
      <div class="tab-bar-item">
        出险代步车服务协议
      </div> -->
      <div class="tab-bar-item" v-for="(item,index) in agreeList" :key="index">
          <router-link :to="{path:'/useragreement',query:{id:item.id}}">{{item.title}}</router-link> 
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return {
      agreeList:[],
    }
  },
  created(){
    this.getAgreeList()
  },
  computed: {

  },
  methods: {
    getAgreeList(){
      let params = {
        "pageSize":10,
        "pageNum":1
      }
      this.$post("/protocol/pageQuery",params).then((res)=>{
        console.log(res)
        if(res.code=='200'){
          this.agreeList=res.data.records
        }
      })
    }
  },

}
</script>

<style lang="scss" scoped>
  .tab-bar{
    .tab-bar-item{
      height:50px;
      line-height:50px;
      border-bottom:1px #ccc solid;
      color:#333;
      padding:0 20px;
      background-color: white;
      font-size: 18px;
      &:last-child{
        border:none;
      }
      a{
        display: block;
        text-decoration:none; 
        color:#333; 
      }
    }
  }
</style>
